package com.rui.study.micro.usermanager.controller.dto;


import com.rui.study.micro.usermanager.controller.dto.group.SignIn;
import com.rui.study.micro.usermanager.controller.dto.group.SignUp;
import com.rui.study.micro.usermanager.entity.UserInfo.Username;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

public class UserInfoDTO {

    @NotNull(message = "can not be null", groups = {SignUp.class, SignIn.class})
    @Valid
    private Username username;

    @NotBlank(message = "can not be blank", groups = {SignUp.class, SignIn.class})
    private String password;

    @NotBlank(message = "can not be blank", groups = {SignUp.class})
    private String verifyCode;


    public Username getUsername() {
        return username;
    }

    public void setUsername(Username username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getVerifyCode() {
        return verifyCode;
    }

    public void setVerifyCode(String verifyCode) {
        this.verifyCode = verifyCode;
    }
}
